from manimlib import *
from numpy import square
import numpy as np

class Test(Scene):
    #75cfb8
    #浅绿
    #bbdfc8
    #浅黄
    #f0e5d8
    #深黄
    #ffc478
    def construct(self):
        # self.add(NumberPlane()) 
        # ,,,
        a,b,c,d,e=[-3,3,0],[3,3,0],[3,-3,0],[-3,-3,0],[0,3*np.tan(PI/12)-3,0]
        f=[3-3*np.tan(PI/12),0,0]
        cf,ce,bf,cb,ef,fe=Line(c,f,color=BLACK),Line(c,e),Line(b,f,color=BLACK),Line(c,b),Line(e,f),Line(f,e,color=BLACK)
        p1=Polygon(c,d,e,fill_opacity=1,color=WHITE).set_fill('#f0e5d8')
        p2=p1.copy().rotate_about_origin(PI/2)
        self.add(p1,p2)
        self.add(Tex('A').next_to(a,UL),Tex('B',).next_to(b,UR),Tex('C',).next_to(c,DR),Tex('D',).next_to(d,DL),Tex('E',).next_to(e,UL))
        self.add(Line(e,b,color=BLACK),Line(e,c,color=BLACK),Line(e,d,color=BLACK))
        angle1=Angle(Line(d,c),Line(d,e),color='#75cfb8')
        angle2=Angle(ce,Line(c,d),color='#75cfb8')
        self.add(angle1,angle2)
        self.add(Tex('15^\circ',color='#75cfb8').move_to([-2.5,-3.3,0]),Tex('15^\circ',color='#75cfb8').move_to([2.5,-3.3,0]))
        self.add(Angle(Line(b,e),Line(b,c),color='#ffc478'))
        self.add(Square(side_length=6,color=BLACK))
        self.wait(0.03)
        a3=Angle(cf,ce,color=BLACK)
        a4=Angle(cb,cf,color=BLACK)
        # self.add(cf,bf,Tex('F').next_to(f,LEFT),a3,a4,Tex('60^\circ').next_to(c,UL),Tex('15^\circ').move_to([3.4,-2.5,0]))
        self.add(cf,bf,Tex('F').next_to(f,LEFT))
        self.wait(0.03)
        self.add(fe)
        self.wait(0.03)
